import type { ICategoryResponse, IReqCategory } from '@/types/category'
import axios from 'axios'

// import { ResultList } from '@/types/bebuy'
/**
 * item/cateList.json?csrf_token=49933af79573cc62133fd1ce9ddde5fb&__timestamp=1691393304460&categoryId=
 * @description 分类数据  49933af79573cc62133fd1ce9ddde5fb
 * @returns 
 */
export const reqCategoryList = (params: IReqCategory) => {
  return axios.get<ICategoryResponse>(`wyyx/item/cateList.json?__timestamp=${params.__timestamp}&categoryId=${params.categoryId}`)
}

export const reqCateList = (params: IReqCategory) => {
  return axios.get(`wyyx/item/list.json?__timestamp=${params.__timestamp}&categoryId=${params.categoryId}&subCategoryId=${params.subCategoryId}&categoryType=${params.categoryType}`)
}